package org.pay.core.service;

import org.pay.core.entity.MchAccount;

import java.util.List;

/**
 * @author: yangshancheng
 * @date: 17/12/4
 * @description:
 */
public interface IMchAccountService {

    List<MchAccount> listAll(int offset, int limit);

    int updateSettAmount(long mchId, long totalAmount);

    MchAccount findByMchId(Long mchId);

    /** 加款:有银行流水 **/
    void creditToAccount(Long mchId, Long amount, Long platProfit, Long channelCost, String requestNo, String channelOrderNo, Byte bizType);

    /** 减款 :有银行流水**/
    void debitToAccount(Long mchId, Long amount, String requestNo, String channelOrderNo, Byte bizType);

    /** 冻结 **/
    void freezeAmount(Long mchId, Long freezeAmount);

    /** 结算成功：解冻+减款 **/
    void unFreezeAmount(Long mchId, Long amount, String requestNo, Byte bizType);

    /** 结算失败：解冻 **/
    void unFreezeSettAmount(Long mchId, Long amount);

}
